projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbbf99b
)
[XEND] Don't prepend '/dev/' to any absolute path.
author
Tim Deegan
<tim.deegan@xensource.com>
Thu, 21 Sep 2006 14:00:50 +0000
(15:00 +0100)
committer
Tim Deegan
<tim.deegan@xensource.com>
Thu, 21 Sep 2006 14:00:50 +0000
(15:00 +0100)
Check for '/' rather than '/dev/' when translating e.g. 'hda'->'/dev/hda'
Signed-off-by: Tim Deegan <tim.deegan@xensource.com>
tools/python/xen/util/blkif.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/util/blkif.py
b/tools/python/xen/util/blkif.py
index f877f65f900b3e94925a1b2060dbc921aae7dd68..dd4f28700400bb2cfc788511bd37bf8cb2c086b3 100644
(file)
--- a/
tools/python/xen/util/blkif.py
+++ b/
tools/python/xen/util/blkif.py
@@
-7,7
+7,7
@@
from xen.xend.XendLogging import log
def expand_dev_name(name):
if not name:
return name
- if re.match( '^/
dev/
', name ):
+ if re.match( '^/', name ):
return name
else:
return '/dev/' + name
@@
-65,7
+65,7
@@
def blkdev_uname_to_file(uname):
fn = None
if uname.find(":") != -1:
(typ, fn) = uname.split(":")
- if typ == "phy" and not fn.startswith("/
dev/
"):
+ if typ == "phy" and not fn.startswith("/"):
fn = "/dev/%s" %(fn,)
return fn